#ifndef _RESULT_H
#define _RESULT_H

#include <string>
#include <list>
#include <iostream>

class Result {

public:
	virtual void print(std::ostream &str) const = 0;
	virtual ~Result() {};
};

std::ostream & operator<< (std::ostream &str, const Result &res);

class Message : public Result {
public:
	Message(const std::string &message = "") : msg(message) {}

	void print(std::ostream &str) const {
		str << msg;
	}
private:
	std::string msg;
};

class Number : public Result {

};

class Int : public Number {
public:
	Int (int value = 0) : val(value) {}

	void print(std::ostream &str) const {
		str << val;
	}
private:
	int val;
};

#endif // _RESULT_H
